package com.example.thegreatwall.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.thegreatwall.entity.ProductDetail;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ProductDetailService extends IService<ProductDetail> {
    /**
     * 根据商品ID获取商品详情列表
     */
    Page<ProductDetail> getDetailsByProductId(Integer productId, Integer pageNum, Integer pageSize);

    /**
     * 获取商品详情
     */
    ProductDetail getDetail(Integer productDetailId);

    /**
     * 根据商品ID和时间获取可用的商品详情
     */
    Page<ProductDetail> getAvailableDetails(Integer productId, String playtime, Integer pageNum, Integer pageSize);

    /**
     * 开园时间
     * @param product_id
     * @return
     */
    Map<String, Object> timesss(@Param("product_id") Integer product_id);
    List<ProductDetail> getProductDetail(@Param("detail_id") Integer detail_id, @Param("user_id")Integer user_id);
}
